package com.ruoyi.inhabitant.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.inhabitant.mapper.inhabitantMapper;
import com.ruoyi.inhabitant.domain.inhabitant;
import com.ruoyi.inhabitant.service.IinhabitantService;

/**
 * 居民用户人脸识别登记Service业务层处理
 * 
 * @author 张柏焰
 * @date 2024-07-09
 */
@Service
public class inhabitantServiceImpl implements IinhabitantService 
{
    @Autowired
    private inhabitantMapper inhabitantMapper;

    /**
     * 查询居民用户人脸识别登记
     * 
     * @param id 居民用户人脸识别登记主键
     * @return 居民用户人脸识别登记
     */
    @Override
    public inhabitant selectinhabitantById(Long id)
    {
        return inhabitantMapper.selectinhabitantById(id);
    }

    /**
     * 查询居民用户人脸识别登记列表
     * 
     * @param inhabitant 居民用户人脸识别登记
     * @return 居民用户人脸识别登记
     */
    @Override
    public List<inhabitant> selectinhabitantList(inhabitant inhabitant)
    {
        return inhabitantMapper.selectinhabitantList(inhabitant);
    }

    /**
     * 新增居民用户人脸识别登记
     * 
     * @param inhabitant 居民用户人脸识别登记
     * @return 结果
     */
    @Override
    public int insertinhabitant(inhabitant inhabitant)
    {
        inhabitant.setCreateTime(DateUtils.getNowDate());
        return inhabitantMapper.insertinhabitant(inhabitant);
    }

    /**
     * 修改居民用户人脸识别登记
     * 
     * @param inhabitant 居民用户人脸识别登记
     * @return 结果
     */
    @Override
    public int updateinhabitant(inhabitant inhabitant)
    {
        inhabitant.setUpdateTime(DateUtils.getNowDate());
        return inhabitantMapper.updateinhabitant(inhabitant);
    }

    /**
     * 批量删除居民用户人脸识别登记
     * 
     * @param ids 需要删除的居民用户人脸识别登记主键
     * @return 结果
     */
    @Override
    public int deleteinhabitantByIds(Long[] ids)
    {
        return inhabitantMapper.deleteinhabitantByIds(ids);
    }

    /**
     * 删除居民用户人脸识别登记信息
     * 
     * @param id 居民用户人脸识别登记主键
     * @return 结果
     */
    @Override
    public int deleteinhabitantById(Long id)
    {
        return inhabitantMapper.deleteinhabitantById(id);
    }
}
